/*
    This file is part of Posixcpp library.

    Posixcpp library is free software: you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public License
    as published by the Free Software Foundation, either version 3 of
    the License, or (at your option) any later version.

    Posixcpp library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU LesserGeneral Public
    License along with Posixcpp library. If not, see
    <http://www.gnu.org/licenses/>.
 */

#ifndef POSIX_SOCKETS_HPP
#define	POSIX_SOCKETS_HPP

#include <sys/socket.h>

namespace posix {
namespace io {
namespace sockets {

/**
 * Socket types
 */
enum class Type_t {
    /**
     * Sequenced, reliable, connection-based byte streams.
     */
    STREAM = SOCK_STREAM,
    DATAGRAM = SOCK_DGRAM,
    RAW = SOCK_RAW,
    SEQPACKET = SOCK_SEQPACKET,
    RDM = SOCK_RDM,
    /**
     * Datagram Congestion Control Protocol.
     */
    DCCP = SOCK_DCCP,
    UNDEFINED
};

enum class Family_t : sa_family_t {
    /**
     * Local
     */
    LOCAL = PF_LOCAL,
    /**
     * IP
     */
    INET = PF_INET,
    /**
     * IPv6
     */
    INET6 = PF_INET6,
    /**
     * Erthernet?
     */
    PACKET = PF_PACKET,
    /**
     * LLC
     */
    LLC = PF_LLC,
    UNSPECIFIED = PF_UNSPEC
};

enum class Flags_t {
    DONTWAIT = MSG_DONTWAIT,
    MORE = MSG_MORE
};

}
}
}

#endif	/* POSIX_SOCKETS_HPP */
